fix: polish Altimate connect dialog — default URL, rename labels, fix placeholder#724
Conversation
… placeholder - parseAltimateKey now accepts `instance-name::api-key` (URL defaults to https://api.myaltimate.com); `api-url::instance-name::api-key` still works for custom/self-hosted instances. - Provider display name: "Altimate" → "Altimate AI". - Default model display name: "Altimate AI" → "Altimate LLM Gateway". - TUI input placeholder for altimate-backend changed from "API key" to "instance-name::api-key" so it matches the expected format. - Dialog copy, example, and validation error message updated to reflect the new default-URL form with custom-URL fallback. - Docs (docs/docs/getting-started.md) and tests updated accordingly. Internal IDs (`altimate-backend`, `altimate-default`) are intentionally left unchanged to preserve auth-store / config compatibility. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR simplifies the Altimate credential format from a required 3-part structure to an optional 2-part format using a default API URL, while preserving support for custom URLs via a 3-part variant. Provider branding was updated from "Altimate" to "Altimate AI," and the model display name was changed to "Altimate LLM Gateway." All related documentation, tests, and UI components were synchronized accordingly. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Polishes the Altimate provider connect flow by supporting a default Altimate API URL when users enter 2-part credentials, updating provider/model display names, and aligning the TUI and docs with the new credential format.
Changes:
- Extend
parseAltimateKeyto acceptinstance-name::api-keywith a default Altimate API URL, while preserving theapi-url::instance-name::api-keyform. - Update provider/model display names for Altimate in the provider registry.
- Update TUI placeholder/help text and add tests/docs reflecting the new credential entry format.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/opencode/test/altimate/datamate.test.ts | Adds test coverage for 2-part Altimate credential parsing and invalid-input handling. |
| packages/opencode/src/provider/provider.ts | Renames Altimate provider/model display names without changing internal IDs. |
| packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx | Updates Altimate connect dialog placeholder, example text, and validation error message for the new format. |
| packages/opencode/src/altimate/api/client.ts | Implements default-URL parsing behavior in parseAltimateKey for 2-part input. |
| docs/docs/getting-started.md | Updates credential format docs and adds guidance for custom API URLs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Drop the `://` heuristic for detecting whether the user supplied an
API URL. Rule is now purely positional:
- split("::").length == 2 → URL omitted → default to
https://api.myaltimate.com
- length >= 3 → first segment IS the URL; validated as http(s)://
This matches the mental model "if split on :: gives 2, no URL".
It also means a 2-part API key cannot contain `::`; that's an
acceptable trade-off because Altimate keys don't use `::`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/opencode/src/provider/provider.ts">
<violation number="1" location="packages/opencode/src/provider/provider.ts:1051">
P3: The provider display name was changed to `"Altimate AI"` here, but the docs at `docs/docs/getting-started.md` line 86 still instruct users to select **Altimate** in `/connect`. Update the docs to say **Altimate AI** so the instructions match the TUI.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
The display name is already "Altimate LLM Gateway" — the ID should match instead of staying as the opaque "altimate-default". Touched: - packages/opencode/src/provider/provider.ts (model registration + default-selection + log message) - packages/opencode/src/acp/agent.ts (default-selection) - packages/opencode/test/provider/provider.test.ts (assertions) - packages/opencode/test/skill/release-v0.5.20-adversarial.test.ts (parseModel test fixture) - docs/docs/configure/providers.md (tip text) Provider ID `altimate-backend` intentionally left alone — that one is an auth-storage / credential-file boundary and renaming it has a much larger blast radius. CHANGELOG.md left alone — historical record. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Addresses review feedback from Copilot and cubic-dev-ai: the getting-started guide instructed users to select **Altimate** in the /connect TUI, but the provider display name is now **Altimate AI**. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Addresses Coderabbit pre-merge docstring-coverage check by documenting the 2-part (default URL) vs 3+ part (custom URL) behavior of parseAltimateKey. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/docs/getting-started.md`:
- Around line 97-101: Clarify that the custom API URL must include the URL
scheme (http:// or https://) by updating the example and explanatory text:
change the generic example line "api-url::instance-name::api-key" to an explicit
example with a scheme like "https://api.example.com::instance-name::api-key" and
add one short sentence stating "Include the URL scheme (http:// or https://) in
the api-url part; hostname-only values will fail validation." This targets the
example and surrounding text in the getting-started.md snippet so the parser
requirement is explicit.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 808dc90a-4fb8-41c3-aab3-c349d4f538f4
📒 Files selected for processing (2)
docs/docs/getting-started.mdpackages/opencode/src/altimate/api/client.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/opencode/src/altimate/api/client.ts
There was a problem hiding this comment.
1 issue found across 7 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/opencode/src/provider/provider.ts">
<violation number="1" location="packages/opencode/src/provider/provider.ts:1025">
P1: Changing the Altimate internal model ID to `altimate-llm-gateway` without an alias breaks backward compatibility for persisted `cfg.model` values that still use `altimate-default`.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
Addresses two review findings: 1. cubic P1 — renaming the internal model ID from `altimate-default` to `altimate-llm-gateway` broke backward compatibility. Opencode persists selected model IDs to `model.json` (favorites, recents, variants) and users can pin `model: altimate-backend/altimate-default` in their opencode.json. After the rename those references would silently go stale. Keep the ID as `altimate-default`; the polish the user actually wanted was the display name, which stays as "Altimate LLM Gateway". Added a comment explaining why the ID is preserved. Rephrased the auto-selection tip in `docs/docs/configure/providers.md` to refer to the display name rather than the internal ID. 2. Coderabbit — the custom-URL example in `docs/docs/getting-started.md` used `api-url::instance-name::api-key` which is ambiguous; the parser requires `http(s)://`. Replaced with a concrete `https://api.example.com::...` example and added a sentence stating the scheme is required. Also reverted provider.ts, acp/agent.ts, provider.test.ts, and release-v0.5.20-adversarial.test.ts to use the original `altimate-default` ID. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
👋 This PR was automatically closed by our quality checks. Common reasons:
If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you. |
|
👋 This PR was automatically closed by our quality checks. Common reasons:
If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you. |
PINEAPPLE
Summary
Polish the Altimate provider connect flow based on Slack feedback:
parseAltimateKeynow acceptsinstance-name::api-key— URL defaults tohttps://api.myaltimate.com. The 3-parthttps://api.example.com::instance-name::api-keyform still works for custom / self-hosted deployments. Detection is purely positional: 2 parts → no URL, 3+ parts → first segment is the URL (must includehttp://orhttps://)."Altimate"→"Altimate AI""Altimate AI"→"Altimate LLM Gateway"altimate-backend,altimate-default) are left unchanged on purpose — renaming them would invalidate persisted model selections inmodel.json(favorites / recents) and break any user withmodel: "altimate-backend/altimate-default"pinned inopencode.json."API key"to"instance-name::api-key"so it matches the expected format.docs/docs/getting-started.md,docs/docs/configure/providers.md) and tests updated to match. The auto-selection tip inproviders.mdnow references the display name ("Altimate LLM Gateway") rather than the internal model ID. CHANGELOG.md left alone (historical).parseAltimateKeydocumenting the two accepted formats.Test plan
bun test test/altimate/datamate.test.ts— 53/53 pass (new coverage for 2-part parsing, whitespace, empty-field rejection, single-part rejection, non-http URL rejection)bun test test/provider/provider.test.ts test/branding/*.test.ts test/skill/release-v0.5.20-adversarial.test.ts— 284/284 passturbo typecheck— no new errors introduced; pre-existinginstallation/index.tserrors onmainare unrelated/connect→ Altimate AI, entermycompany::abc123, confirm credentials validate against the defaultapi.myaltimate.comURLhttps://api.getaltimate.com::mycompany::abc123, confirm the custom-URL path still worksChecklist
Review threads (all resolved)
12b1a30bc).ad14dd5b4).api-url::...withhttps://api.example.com::...and added explicit scheme requirement (commitad14dd5b4).parseAltimateKey(commit454f9f2dd).🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
instance-name::api-keywith automatic default API URLapi-url::instance-name::api-keyDocumentation